(function(){
	Ext.onReady(function(){
		Ext.get('btn1').on('click',function(){
			var time = Ext.get('time').getLoader();
			time.load({
				url:'/laoluo-erp/lesson!getTime.action',
				renderer:function(loader,response,request){
					Ext.getDom('time').value = response.responseText;
				}
			});
		});
		
		Ext.get('btn2').on('click',function(){
			var time = Ext.get('time2').getLoader();
			time.startAutoRefresh(1000,{
				url:'/laoluo-erp/lesson!getTime.action',
				renderer:function(loader,response,request){
					Ext.getDom('time2').value = response.responseText;
				}
			});
		});
	});
})();